package com.cloud.cloudcommons.utils;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @Aurher: QiaoHang
 * @Description:
 * @Data: 2019/9/21 14:55
 * @Modified By:
 */
public class CommonCheck {

    /**
     * strings is null
     * @param strings
     * @return
     */
    public static boolean nullStrings(String... strings){
        if(strings==null || strings.length<=0){
            return true;
        }else {
            for (String string : strings) {
                if(string==null || "".equals(string.trim())){
                   return true;
                }
            }
        }
        return false;
    }

    public static  boolean nullList(List<?> list){
        if(list==null || list.size()<=0){
            return true;
        }
        return false;
    }



    public static  boolean nullSet(Set<?> set){
        if(set==null || set.size()<=0){
            return true;
        }
        return false;
    }


    public static  boolean nullMap(Map map){
        if(map==null || map.size()<=0){
            return true;
        }
        return false;
    }


}
